1. Field of the Invention
The present invention relates to an MPEG picture processing apparatus and a data transferring method using the apparatus in which a decoding operation based on MPEG (Moving Picture Experts Group) is performed and MPEG data is transferred.
2. Description of Related Art
In a picture and audio processing LSI such as an MPEG-2 video and audio decoder, a frame memory, which is used to store a frame of picture data, or a system memory such as an SDRAM (static dynamic random access memory) having an area of an FIFO (first-in first-out) buffer used for an input bit stream is arranged in the inside or outside of the LSI. In this LSI, it is required to perform the transfer of a large quantity of data between a data processing unit and the system memory (or the frame memory). However, the integration in the system LSI has been advanced, the number of functions given to one chip has been increased, and the number of types of data has been increased. Therefore, because a quantity of data and the number of types of data have been increased, it is required to efficiently use a data transfer band. Also, because an inter-frame prediction coding is performed in the picture compression based on the MPEG, picture data used for the prediction is extracted from a frame of picture data, which is stored in a frame memory and precedes or succeeds time-wise to a current frame to be processed, and is used for the decoding operation performed in the video decoder, and decoded data of a reconstructed picture obtained in the video decoder is again written in the frame memory. Therefore, the decoding of picture data closely relates to the data transfer of the picture data from/to the frame memory. In this case, to efficiently operate the video decoder, it is required to transfer the picture data between the video decoder and the frame memory at an optimum timing of the picture data.
FIG. 8 is a block diagram showing the configuration of a conventional picture processing apparatus having a video decoder and a transfer request processing unit. In FIG. 8, 1 indicates a decoding processing unit for decoding picture data. In the decoding processing unit 1, 2 indicates a video decoder, and 3 indicates a video decoding control unit for producing and outputting a plurality of transfer requests, which respectively indicate a request for the data transfer of a type of data, in a pre-set order. 4 indicates a request processing unit for receiving the transfer requests output from the video decoding control unit 3 one after another and outputting a transfer start instruction, which indicates an instruction for the starting of the data transfer of a particular type of data, in response to one transfer request corresponding to the particular type of data for each transfer request. 5 indicates a selector for receiving a plurality of possible data transfer quantities (respectively indicating a possible quantity of a type of data to be transferred), selecting one possible data transfer quantity of the particular type of data, which corresponds to the transfer start instruction, each time the transfer start instruction is output from the request processing unit 4 and outputting the selected possible data transfer quantity as a data transfer quantity (indicating a quantity of data to be transferred) of the particular type of data. 6 indicates a transfer ACK producing unit for producing an acknowledgment signal ACK, which indicates the acknowledgment of the data transfer of the particular type of data, according to the transfer start instruction output from the request processing unit 4 and outputting the acknowledgment signal ACK to the video decoding control unit 3.
Next, an operation of the conventional picture processing apparatus is described.
In an example showing in FIG. 8, the transfer of five types of data dr, dw, a, b and c from the decoding processing unit 1 to an SDRAM (not shown) is performed. Here, the data dr and the data dw denote types of data for a reconstructed picture (called for-reconstructed-picture data), and the data a, the data b and the data c denote types of data other than the for-reconstructed-picture data.
In the video decoding control unit 3, a plurality of transfer requests q-dr, q-dw, q-a, q-b and q-c corresponding to the types of data dr, dw, a, b and c are produced and output to the request processing unit 4 in a pre-set order. For example, the transfer requests q-dr, q-dw, q-a, q-b and q-c are output in that order. Also, a data transfer quantity of the data dr and a data transfer quantity of the data dw are respectively predetermined to a fixed value. In contrast, a possible data transfer quantity of each of the types of data a, b and c is changeable according to an empty capacity of a buffer, to which the corresponding type of data is transferred, and a data filled quantity of a buffer from which the corresponding type of data is transferred. The possible data transfer quantity of the type of data a is indicated by a sign wc-a, the possible data transfer quantity of the type of data b is indicated by a sign wc-b, and the possible data transfer quantity of the type of data c is indicated by a sign wc-c.
Initially, a transfer request q-dr of the data dr produced in the video decoding control unit 3 is output to the request processing unit 4. In the request processing unit 4, the transfer request q-dr is received, and a transfer start instruction of the data dr is actually output. Therefore, the data transfer of the data dr is started. Thereafter, in the transfer ACK producing unit 6, an acknowledgment signal ACK-dr, which indicates the acknowledgment of the transfer of the data dr, is produced according to the transfer start instruction of the data dr and is output to the video decoding control unit 3. In the video decoding control unit 3, a transfer request q-dw of the data dw corresponding to a next data transfer is produced in response to the acknowledgment signal ACK-dr and is output to the request processing unit 4. In the request processing unit 4, when the transfer of the data dr currently performed is completed, a transfer start instruction of the data dw, for which the transfer request q-dw has been already received in the request processing unit 4, is output. Therefore, the data transfer of the data dw is started. Thereafter, in the transfer ACK producing unit 6, an acknowledgment signal ACK-dw is produced according to the transfer start instruction of the data dw and is output to the video decoding control unit 3. In the video decoding control unit 3, a transfer request q-a of the data a corresponding to a next data transfer is produced in response to the acknowledgment signal ACK-dw and is output to the request processing unit 4. In the request processing unit 4, when the transfer of the data dw currently performed is completed, a transfer start instruction of the data a, for which the transfer request q-a has been already received in the request processing unit 4, is output. In this case, in the transfer of the data a, because a possible data transfer quantity of the data a is changeable in dependence on the output timing of the transfer start instruction of the data a, a possible data transfer quantity wc-a determined at the output timing of the transfer start instruction of the data a is selected in the selector 5 according to the transfer start instruction of the data a, and the possible data transfer quantity wc-a is output as a data transfer quantity of the data a. Therefore, the data transfer of the data a is started to transfer the data a of the data transfer quantity. In the same manner, the data transfer of the data b and the data transfer of the data c are started in that order to transfer the data b of a data transfer quantity and the data c of a data transfer quantity. Thereafter, in response to an acknowledgment signal ACK-c output from the transfer ACK producing unit 6, the transfer request q-dr of the type of data dr is again produced in the video decoding control unit 3, and the above processing is repeated.
As is described above, in cases where the number of types of data to be transferred is small, a plurality of transfer requests are produced and output from the video decoding control unit 3 in a pre-set order, and the data transfer of a next type of data is started each time the data transfer of a type of data currently performed is completed. This data transfer control method is available for the types of data of which the number is small.
However, because the types of data are transferred in the pre-set order in the conventional picture processing apparatus having the decoding processing unit 1 and the request processing unit 4, in cases where the number of types of data transferred between the video decoder 2 and an external memory (for example, a frame memory or an SDRAM) is increased, there are following problems.
That is, there is a case where a data transfer band is narrowed. In this case, even though it is not required to immediately perform the transfer of a type of data corresponding to a low possible data transfer quantity, there is a possibility that the transfer of the type of data is immediately transferred according to the pre-set order without immediately transferring another type of data for which an immediate data transfer is desired. Therefore, there is a problem that a data transfer efficiency is lowered in the conventional picture processing apparatus.
Also, in cases where the number of types of data to be transferred is increased, there is a possibility that a timing of the data transfer of the for-reconstructed-picture data dr or dw, in which the data transfer timing is important, is shifted from its optimum transfer timing by receiving an inverse influence of the change of the data transfer quantity of one type of data a, b or c other than the for-reconstructed-picture data. Therefore, there is another problem that it is difficult to maintain an optimum operation of the video decoder 2.
An object of the present invention is to provide, with due consideration to the problems of the conventional picture processing apparatus, an MPEG picture processing apparatus and a data transferring method using the apparatus in which the decoding operation using a type of for-reconstructed-picture data is efficiently performed, even though the number of types of data is increased or a data transfer quantity of a type of data other than the type of for-reconstructed-picture data is changed, and the transfer of data other than the type of for-reconstructed-picture data is preferably performed if necessary.
The object is achieved by the provision of an MPEG picture processing apparatus of the present invention comprising
an MPEG decoding processing unit for decoding picture data; a plurality of data processing units for respectively processing a second type of data; a data storing unit, which is connected with the MPEG decoding processing unit and the data processing units through a data bus, for storing the picture data and the second types of data; and a transfer control unit for controlling a for-reconstructed-picture data transfer between the MPEG decoding processing unit and the data storing unit and a second typed at a transfer between each data processing unit and the data storing unit,
wherein the MPEG decoding processing unit comprises a data transfer quantity limiting value producing unit for producing a data transfer quantity limiting value set to a first setting value which is initially determined according to an optimum transfer time-period of the picture data relating to the decoding performed by the MPEG decoding processing unit and is decreased with respect to an operation cycle of the decoding performed by the MPEG decoding processing unit, and the transfer control unit comprises a transfer request processing unit for controlling a data transfer quantity of each second type of data, which is to be transferred in the second type data transfer other than the for-reconstructed-picture data transfer, according to the data transfer quantity limiting value produced in the data transfer quantity limiting value producing unit.
In the above configuration, the data transfer quantity limiting value is decreased to a low value in the optimum transfer time-period of the picture data. Because the second type data transfer other than the for-reconstructed-picture data transfer is performed according to the data transfer quantity limiting value, the performance of the second type data transfer is suppressed in the optimum transfer time-period of the picture data.
Accordingly, the for-reconstructed-picture data transfer between the MPEG decoding processing unit and the data storing unit can be preferably performed, and the decoding operation in the MPEG decoding processing unit can be efficiently performed even though the number of types of data is increased or a data transfer quantity of a type of data other than the type of for-reconstructed-picture data is changed.
Also, the transfer of the second types of data other than the for-reconstructed-picture data can be preferably performed if necessary.
It is preferred that the transfer request processing unit comprises a comparing unit for comparing a pre-set threshold value of transfer start with a possible data transfer quantity of each second type of data, the possible data transfer quantity of the second type of data being determined according to a data filled quantity of a storage area of the corresponding data processing unit or the data storing unit, from which the second type of data is transferred, and a data empty capacity of a storage area of the data storing unit or the corresponding data processing unit to which the second type of data is transferred; and a priority order data transfer control unit for determining a particular second type data transfer, which is first performed among the second type data transfers, according to comparison results obtained in the comparing units and a pre-set priority order.
In the above configuration, in cases where possible data transfer quantities in second type data transfers are respectively higher than the threshold value of transfer start, the possible data transfer quantities of the second types of data are sufficiently large to perform the second type data transfer. Thereafter, a particular second type data transfer having the highest priority among the second type data transfers is preferentially performed.
Accordingly, the transfer of the second types of data other than the for-reconstructed-picture data can be efficiently performed in the priority order.
Also, it is preferred that the data transfer quantity limiting value producing unit comprises a limiting unit for limiting the data transfer quantity limiting value according to a second setting value which is determined according to a macro-block decoding method adopted in the MPEG decoding processing unit, the data transfer quantity limiting value limited in the limiting unit being output to the transfer request processing unit.
In the above configuration, in cases where the macro-block decoding method adopted in the MPEG decoding processing unit is, for example, a forward prediction MB mode or a bi-directional prediction MB mode, each second type data transfer other than the for-reconstructed-picture data transfer is additionally limited according to the second setting value.
Accordingly, even though the macro-block decoding method adopted in the MPEG decoding processing unit is changed, the for-reconstructed-picture data transfer can be performed according to the macro-block decoding method, and the decoding operation in the MPEG decoding processing unit can be efficiently performed.
Also, it is preferred that the transfer request processing unit comprises a comparing unit for comparing a pre-set decoding delay threshold value with a possible data transfer quantity of each second type of data, the possible data transfer quantity of the second type of data being determined according to a data filled quantity of a storage area of the corresponding data processing unit or the data storing unit, from which the second type of data is transferred, and a data empty capacity of a storage area of the data storing unit or the corresponding data processing unit to which the second type of data is transferred; and a decoding start delay requesting unit for requesting a decoding start delay of the MPEG decoding processing unit according to comparison results obtained in the comparing units to delay the starting of a decoding operation for the picture data performed in the MPEG decoding processing unit.
In the above configuration, in cases where at least one possible data transfer quantity of one second type of data is larger than the decoding delay threshold value, the possible data transfer quantity of the second type of data is sufficiently large to transfer the second type of data, and it is desired to immediately transfer the second type of data. In this case, the starting of a decoding operation for the picture data of a next macro-block performed in the MPEG decoding processing unit is delayed, and the second type data transfer of the second type of data is performed during a decoding start delayed time-period.
Accordingly, the transfer of the second type of data other than the for-reconstructed-picture data can be efficiently performed while the decoding operation in the MPEG decoding processing unit is efficiently performed.
The object is also achieved by the provision of an data transferring method of an MPEG picture processing apparatus, which comprises an MPEG decoding processing unit for decoding picture data, a plurality of data processing units for respectively processing a second type of data, and a data storing unit, which is connected with the MPEG decoding processing unit and the data processing units through a data bus, for storing the picture data and the second types of data, comprising the steps of determining a first setting value according to an optimum transfer time-period of the picture data relating to the decoding performed by the MPEG decoding processing unit; decreasing the first setting value with respect to an operation cycle of the decoding performed by the MPEG decoding processing unit; producing a data transfer quantity limiting value set to the first setting value; and controlling a data transfer quantity of each second type of data, which is transferred through the data bus in a second type data transfer other than a for-reconstructed-picture data transfer of the picture data, according to the data transfer quantity limiting value.
In the above steps, the data transfer quantity limiting value is decreased to a low value in the optimum transfer time-period of the picture data. Because the second type data transfer other than the for-reconstructed-picture data transfer is performed according to the data transfer quantity limiting value, the performance of the second type data transfer is suppressed in the optimum transfer time-period of the picture data.
Accordingly, the for-reconstructed-picture data transfer between the MPEG decoding processing unit and the data storing unit can be preferably performed, and the decoding operation in the MPEG decoding processing unit can be efficiently performed even though the number of types of data is increased or a data transfer quantity of a type of data other than the type of for-reconstructed-picture data is changed.
Also, the transfer of the second types of data other than the for-reconstructed-picture data can be preferably performed if necessary.
It is preferred that the data transferring method of an MPEG picture processing apparatus further comprises the steps of determining a possible data transfer quantity of each second type of data according to a data filled quantity of a storage area of the corresponding data processing unit or the data storing unit, from which the second type of data is transferred, and a data empty capacity of a storage area of the data storing unit or the corresponding data processing unit to which the second type of data is transferred; selecting one or more second type data transfers of one or more particular second types of data, of which the possible data transfer quantities are respectively larger than a threshold value of transfer start, from the second type data transfers of the second types of data; selecting the second type data transfer of a specific second type of data relating to a highest priority from the second type data transfers of the particular second types of data: and preferentially performing the second type data transfer of the specific second type of data.
In the above steps, in cases where possible data transfer quantities in second type data transfers are respectively higher than the threshold value of transfer start, the possible data transfer quantities of the second types of data are sufficiently large to perform the second type data transfer. Thereafter, a particular second type data transfer having the highest priority among the second type data transfers is preferentially performed.
Accordingly, the transfer of the second types of data other than the for-reconstructed-picture data can be efficiently performed in the priority order.
Also, it is preferred that the data transferring method of an MPEG picture processing apparatus further comprises the steps of determining a second setting value according to a macro-block decoding method adopted in the MPEG decoding processing unit; and limiting the data transfer quantity limiting value according to the second setting value.
In the above steps, in cases where the macro-block decoding method adopted in the MPEG decoding processing unit is, for example, a forward prediction MB mode or a bi-directional prediction MB mode, each second type data transfer other than the for-reconstructed-picture data transfer is additionally limited according to the second setting value.
Accordingly, even though the macro-block decoding method adopted in the MPEG decoding processing unit is changed, the for-reconstructed-picture data transfer can be performed according to the macro-block decoding method, and the decoding operation in the MPEG decoding processing unit can be efficiently performed.
Also, it is preferred that the data transferring method of an MPEG picture processing apparatus further comprises the step of delaying the starting of the decoding of a next macro-block to be performed in the MPEG decoding processing unit, in cases where one second type data transfer other than the for-reconstructed-picture data transfer remains when the decoding of a current macro-block performed in the MPEG decoding processing unit is completed, until the second type data transfer other than the for-reconstructed-picture data transfer is completed.
In the above step, in cases where at least one possible data transfer quantity of one second type of data is larger than the decoding delay threshold value, the possible data transfer quantity of the second type of data is sufficiently large to transfer the second type of data, and it is desired to immediately transfer the second type of data. In this case, the starting of a decoding operation for the picture data of a next macro-block performed in the MPEG decoding processing unit is delayed, and the second type data transfer of the second type of data is performed during a decoding start delayed time-period.
Accordingly, the transfer of the second type of data other than the for-reconstructed-picture data can be efficiently performed while the decoding operation in the MPEG decoding processing unit is efficiently performed.